﻿using System;
using System.Collections.Generic;
using System.Text;
using GalaSoft.MvvmLight;
using SQLite;

namespace MasterDetailTemplate.Models {
    /// <summary>
    /// 事件
    /// By XJ
    /// </summary>
    [SQLite.Table("event")]
    public class Event : ViewModelBase {
        private long _id;
        private string _title;
        private DateTime _date;
        private int _attribute;
        private int _isImport;
        private string _description;
        private long _dateStamp;

        /// <summary>
        /// ID。
        /// </summary>
        [SQLite.Column("id"), PrimaryKey]
        public long Id {
            get { return _id; }
            set {
                _id = value;
                RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 事件名称。
        /// </summary>
        [SQLite.Column("title")]
        public string Title {
            get { return _title; }
            set {
                _title = value;
                RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 事件日期。
        /// </summary>
        [SQLite.Column("date")]
        public DateTime Date {
            get { return _date; }
            set {
                _date = value;
                RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 属性 纪念日1 倒数日2
        /// </summary>
        [SQLite.Column("attribute")]
        public int Attribute {
            get { return _attribute; }
            set {
                _attribute = value;
                RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 事件是否重要。
        /// </summary>
        [SQLite.Column("is_import")]
        public int IsImportant {
            get { return _isImport; }
            set {
                _isImport = value;
                RaisePropertyChanged();
            }
        }


        /// <summary>
        /// 事件描述。
        /// </summary>
        [SQLite.Column("description")]
        public string Description {
            get { return _description; }
            set {
                _description = value;
                RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 数据存入数据库时间戳。
        /// </summary>
        [SQLite.Column("datestamp")]
        public long DateStamp {
            get { return _dateStamp; }
            set {
                _dateStamp = value;
                RaisePropertyChanged();
            }
        }
    }
}